/**
 * @description pinia持久化参数配置
 * @param {String} key 存储到持久化的 name
 * @param {boolean} type 存储位置 true:localStorage/false:sessionStorage
 * @return persist
 * */
// import { PersistedStateOptions } from "pinia-plugin-persistedstate";

const piniaPersistConfig = (key, type) => {
  const persist = {
    key,
    storage: type ? window.localStorage : window.sessionStorage
  };
  return persist;
};
export default piniaPersistConfig;
